package com.shine.chemicalWholeProcessSystem.view.pop;

import android.content.Context;

import androidx.annotation.NonNull;

import com.lxj.xpopup.core.BottomPopupView;
import com.lxj.xpopup.interfaces.OnCancelListener;
import com.lxj.xpopup.interfaces.OnConfirmListener;
import com.lxj.xpopup.util.XPopupUtils;
import com.shine.chemicalWholeProcessSystem.R;

public class SearchBottomPopup extends BottomPopupView {
    OnConfirmListener confirmListener;
    OnCancelListener cancelListener;


    public SearchBottomPopup(@NonNull Context context) {
        super(context);
    }

    @Override
    protected int getImplLayoutId() {
        return R.layout.popup_search_bottom;
    }

    @Override
    protected void onCreate() {
        super.onCreate();
    }

    public SearchBottomPopup setListener(OnConfirmListener confirmListener, OnCancelListener onCancelListener) {
        this.confirmListener = confirmListener;
        this.cancelListener = onCancelListener;
        return this;
    }

    //完全可见执行
    @Override
    protected void onShow() {
        super.onShow();
    }

    //完全消失执行
    @Override
    protected void onDismiss() {
    }

    @Override
    protected int getMaxHeight() {
//        return XPopupUtils.getWindowHeight(getContext());
        return (int) (XPopupUtils.getWindowHeight(getContext()) * .9f);
    }

}
